<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/



//web页面
Route::middleware('MyAuth')->group(function () {
    // Controllers Within The "App\Http\Controllers\Admin" Namespace
    Route::get('/', 'IndexController@index');
    Route::get('/spider/index', 'SpiderController@index');
    Route::get('/index/index', 'IndexController@index');
    Route::get('/index/countInfo', 'IndexController@countInfo');

    //机器列表
    Route::get('/machine/index', 'MachineController@index');
    //获取补货清单
    Route::any('/machine/getLack', 'MachineController@getLacks');
    //编辑货道doEditMachineSlots
    Route::get('/machine/editMachineSlots', 'MachineController@editMachineSlots');
    //保存 编辑货道
    Route::post('/machine/doEditMachineSlots', 'MachineController@doEditMachineSlots');


    //商品管理
    Route::get('/goods/index', 'GoodsController@index');
    //搜索商品
    Route::get('/goods/selectGoodsByName', 'GoodsController@selectGoodsByName');


    //订单管理
    Route::get('/order/index', 'OrderController@index');

});

Route::post('/doLogin', 'LoginController@doLogin');
Route::get('/login', 'LoginController@login');
Route::get('/logout', 'LoginController@logOut');
/*//Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');*/



//api接口
Route::namespace('Api')->middleware('ValidateApiSign')->group(function () {
// Controllers Within The "App\Http\Controllers\Admin" Namespace
    //商品管理
    Route::any('/api/chuhuo', 'IndexController@chuhuo');
});


